Skip to main content
Feedback

JSON Threat Protection policy

Updated 22 July 2026

The json-threat-protection policy validates a JSON request body by specifying limits for various JSON structures such as arrays, field names, and string values. When the policy detects an invalid request because it reaches a limit, it treats the request as a threat. The policy then rejects the request with a 400 BAD REQUEST.

Timing

On RequestOn Request Content
X

Configuration

PropertyRequiredDescriptionTypeDefault
maxEntriesnoMaximum number of entries allowed for a JSON object. For example, { "a":{ "b":1, "c":2, "d":3 }}, a has three entries.integer (-1 to specify no limit)100
maxArraySizenoMaximum number of elements allowed in an array.integer (-1 to specify no limit)100
maxDepthnoMaximum depth of JSON structure. For example, { "a":{ "b":{ "c":true }}} has a depth of three.integer (-1 to specify no limit)100
maxNameLengthnoMaximum string length allowed for a JSON property name.integer (-1 to specify no limit)100
maxValueLengthnoMaximum string length allowed for a JSON property value.integer (-1 to specify no limit)500

Errors

HTTP status code

CodeMessage
400Received in the following cases:
Invalid JSON structure, maximum depth exceeded, maximum JSON entries exceeded, maximum JSON array size exceeded, maximum JSON field name length exceeded, maximum JSON field value length exceeded
On this Page